<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD><TITLE>pkg::create manual page - Tcl Built-In Commands</TITLE>
<link rel="stylesheet" href="../docs.css" type="text/css" media="all">
</HEAD>
<BODY><H2><a href="../contents.htm">Tcl8.6.11/Tk8.6.11 Documentation</a> <small>&gt;</small> <a href="contents.htm">Tcl Commands</a> <small>&gt;</small> packagens</H2>
<H3><A HREF="../UserCmd/contents.htm">Tcl/Tk Applications</A> | <A HREF="../TclCmd/contents.htm">Tcl Commands</A> | <A HREF="../TkCmd/contents.htm">Tk Commands</A> | <A HREF="../ItclCmd/contents.htm">[incr Tcl] Package Commands</A> | <A HREF="../SqliteCmd/contents.htm">SQLite3 Package Commands</A> | <A HREF="../TdbcCmd/contents.htm">TDBC Package Commands</A> | <A HREF="../TdbcmysqlCmd/contents.htm">tdbc::mysql Package Commands</A> | <A HREF="../TdbcodbcCmd/contents.htm">tdbc::odbc Package Commands</A> | <A HREF="../TdbcpostgresCmd/contents.htm">tdbc::postgres Package Commands</A> | <A HREF="../TdbcsqliteCmd/contents.htm">tdbc::sqlite3 Package Commands</A> | <A HREF="../ThreadCmd/contents.htm">Thread Package Commands</A> | <A HREF="../TclLib/contents.htm">Tcl C API</A> | <A HREF="../TkLib/contents.htm">Tk C API</A> | <A HREF="../ItclLib/contents.htm">[incr Tcl] Package C API</A> | <A HREF="../TdbcLib/contents.htm">TDBC Package C API</A></H3>
<DL>
<DD><A HREF="packagens.htm#M2" NAME="L1379">NAME</A>
<DL><DD>pkg::create &mdash; Construct an appropriate 'package ifneeded' command for a given package specification</DD></DL>
<DD><A HREF="packagens.htm#M3" NAME="L1380">SYNOPSIS</A>
<DL>
</DL>
<DD><A HREF="packagens.htm#M4" NAME="L1381">DESCRIPTION</A>
<DD><A HREF="packagens.htm#M5" NAME="L1382">OPTIONS</A>
<DL class="options">
<DD><A HREF="packagens.htm#M6" NAME="L1383"><B>-name </B><I>packageName</I></A>
<DD><A HREF="packagens.htm#M7" NAME="L1384"><B>-version </B><I>packageVersion</I></A>
<DD><A HREF="packagens.htm#M8" NAME="L1385"><B>-load </B><I>filespec</I></A>
<DD><A HREF="packagens.htm#M9" NAME="L1386"><B>-source </B><I>filespec</I></A>
</DL>
<DD><A HREF="packagens.htm#M10" NAME="L1387">SEE ALSO</A>
<DD><A HREF="packagens.htm#M11" NAME="L1388">KEYWORDS</A>
</DL>
<H3><A NAME="M2">NAME</A></H3>
pkg::create &mdash; Construct an appropriate 'package ifneeded' command for a given package specification
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>::pkg::create</B> <B>-name </B><I>packageName </I><B>-version </B><I>packageVersion</I> ?<B>-load </B><I>filespec</I>? ... ?<B>-source </B><I>filespec</I>? ...<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
<B>::pkg::create</B> is a utility procedure that is part of the standard Tcl
library.  It is used to create an appropriate <B><A HREF="../TclCmd/package.htm">package ifneeded</A></B>
command for a given package specification.  It can be used to construct a
<B>pkgIndex.tcl</B> file for use with the <B><A HREF="../TclCmd/package.htm">package</A></B> mechanism.

<H3><A NAME="M5">OPTIONS</A></H3>
The parameters supported are:
<P>
<DL class="options">
<DT><A NAME="M6"><B>-name </B><I>packageName</I></A><DD>
This parameter specifies the name of the package.  It is required.
<P><DT><A NAME="M7"><B>-version </B><I>packageVersion</I></A><DD>
This parameter specifies the version of the package.  It is required.
<P><DT><A NAME="M8"><B>-load </B><I>filespec</I></A><DD>
This parameter specifies a binary library that must be loaded with the
<B><A HREF="../TclCmd/load.htm">load</A></B> command.  <I>filespec</I> is a list with two elements.  The
first element is the name of the file to load.  The second, optional
element is a list of commands supplied by loading that file.  If the
list of procedures is empty or omitted, <B>::pkg::create</B> will
set up the library for direct loading (see <B>pkg_mkIndex</B>).  Any
number of <B>-load</B> parameters may be specified.
<P><DT><A NAME="M9"><B>-source </B><I>filespec</I></A><DD>
This parameter is similar to the <B>-load</B> parameter, except that it
specifies a Tcl library that must be loaded with the
<B><A HREF="../TclCmd/source.htm">source</A></B> command.  Any number of <B>-source</B> parameters may be
specified.
<P></DL>
<P>
At least one <B>-load</B> or <B>-source</B> parameter must be given.
<H3><A NAME="M10">SEE ALSO</A></H3>
<B><A HREF="../TclCmd/package.htm">package</A></B>
<H3><A NAME="M11">KEYWORDS</A></H3>
<A href="../Keywords/A.htm#auto-load">auto-load</A>, <A href="../Keywords/I.htm#index">index</A>, <A href="../Keywords/P.htm#package">package</A>, <A href="../Keywords/V.htm#version">version</A>
<div class="copy">Copyright &copy; 1998-2000 Scriptics Corporation.
</div>
</BODY></HTML>
